//
//  ViewController.m
//  03-29-apiDemo-practice
//
//  Created by student on 16/3/29.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "ViewController1.h"
#import "NetManager1.h"
@interface ViewController1 ()
@property (weak, nonatomic) IBOutlet UITextField *citynameTextField;

@property (weak, nonatomic) IBOutlet UITextView *resultTextField;
@end

@implementation ViewController1

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)btnPressed:(id)sender {
    
    [NetManager1 requestInfoByCityName:self.citynameTextField.text successBlock:^(NSString *result) {
        self.resultTextField.text=result;
    } failedBlock:^(NSError *error) {
        self.resultTextField.text= [error localizedDescription];
    }];
    
}

@end
